#!/usr/bin/env python3
# coding: utf-8

import sys
from PyQt5.QtWidgets import QApplication,QWidget,QMainWindow, QPushButton
from PyQt5.QtGui import QIcon
from PyQt5.QtCore import pyqtSlot


class App(QMainWindow):
    def __init__(self):
        super().__init__()
        self.title = "PyQt5 simple button"
        self.left = 10
        self.top = 10
        self.width = 600
        self.height = 600
        self.initUI()
    def initUI(self):
        self.setWindowTitle(self.title)
        self.setGeometry(self.left,self.top,self.width,self.height)

        button = QPushButton('PyQt5 button',self)
        button.setToolTip('This is an example button')
        button.clicked.connect(self.on_click)
        button.move(200,200)

        self.show()

    @pyqtSlot()
    def on_click(self):
        print('PyQt5 button clieck')

if __name__ == '__main__':
    app = QApplication(sys.argv)
    ex = App()
    sys.exit(app.exec_())
